﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SignalrService.SignalrService
{
    public interface IOnlineClient
    {
        string ConnectionId { get; }
        string IpAddress { get; }
        long UserId { get; }

    }
    public class OnlineClient : IOnlineClient
    {
        public OnlineClient()
        {
            ConnectTime = DateTime.Now;
        }
        public string ConnectionId { get; set; }
        public string IpAddress { get; set; }
        public long UserId { get; set; }
        public DateTime ConnectTime { get; set; }

        public OnlineClient(string connectionId, string ipAddress,  long userId)
           : this()
        {
            ConnectionId = connectionId;
            IpAddress = ipAddress;
            UserId = userId;
           
        }

    }


}
